# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-elsapy
_pkgorig=elsapy
pkgver=0.5.1
pkgrel=4
pkgdesc="A Python module for use with Elsevier's APIs"
url="https://github.com/ElsevierDev/elsapy"
arch="noarch"
license="BSD-3-Clause"
depends="
	python3
	py3-requests
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/e/elsapy/elsapy-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONPATH=build/lib python3 -c "from elsapy.elsclient import ElsClient"
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
bac5613d9178e88baf435635b5548090e0e153f711e846ae0ca6d1d9a8de3c18e04428c71332f2c44b68e39af5b6fd6d726769ee42c52abb6b4b31ff4e1ea607  elsapy-0.5.1.tar.gz
"
